package com.bnq.logc

class LogcLevel {
    companion object{
        const val VERBOSE = 1 //常规
        const val DEBUG = 2   //常规
        const val INFO = 3    //常规
        const val WARN = 4    //常规
        const val ERROR = 5   //错误
        const val EVENT = 6   //事件
        const val RECORD = 7  //紧急
        const val SOS = 8     //非常紧急

        fun getLevelName(level:Int):String {
            return when(level){
                VERBOSE -> "VERBOSE"
                DEBUG -> "DEBUG"
                INFO -> "INFO"
                WARN -> "WARN"
                ERROR -> "ERROR"
                EVENT -> "EVENT"
                RECORD -> "RECORD"
                SOS -> "SOS"
                else -> if(level < VERBOSE) "VERBOSE-${level}" else "SOS-$level"
            }
        }
    }
}